home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / pdcurs21 / private / _getcrsr.c < prev    next >
C/C++ Source or Header  |  1993-06-20  |  2KB  |  76 lines

  1. #define    CURSES_LIBRARY    1
  2. #include <curses.h>
  3.  
  4. #ifdef PDCDEBUG
  5. char *rcsid__getcrsr = "$Header: C:\CURSES\private\RCS\_getcrsr.c 2.1 1993/06/18 20:22:55 MH Rel MH $";
  6. #endif
  7.  
  8.  
  9.  
  10.  
  11. /*man-start*********************************************************************
  12.  
  13.   PDC_get_cursor_mode()    - Get the cursor start and stop scan lines.
  14.  
  15.   PDCurses Description:
  16.      Gets the cursor type to begin in scan line startrow and end in
  17.      scan line endrow.  Both values should be 0-31.
  18.  
  19.   PDCurses Return Value:
  20.      This function returns OK on success and ERR on error.
  21.  
  22.   PDCurses Errors:
  23.      No errors are defined for this function.
  24.  
  25.   Portability:
  26.      PDCurses    int PDC_get_cursor_mode( void );
  27.  
  28. **man-end**********************************************************************/
  29.  
  30. int    PDC_get_cursor_mode(void)
  31. {
  32.  
  33. #ifdef    DOS
  34.     short        cmode;
  35. #endif
  36.  
  37. #ifdef    OS2
  38.     VIOCURSORINFO cursorInfo;
  39.     short        cmode;
  40. #endif
  41.  
  42. #ifdef PDCDEBUG
  43.     if (trace_on) PDC_debug("PDC_get_cursor_mode() - called\n");
  44. #endif
  45.  
  46. #ifdef    FLEXOS
  47.     /*
  48.      * Under FLEXOS, this routine returns 1 if the cursor is on and 0 if
  49.      * the cursor is off...
  50.      */
  51.     s_getfield(T_VIRCON, VC_MODE, STDOUT, (far BYTE *) & vir,
  52.         sizeof(vir.vc_mode));
  53.  
  54.     if (vir.vc_mode & VCWM_CURSOR)
  55.         return (TRUE);
  56.     else
  57.         return (FALSE);
  58. #endif
  59.  
  60. #ifdef    DOS
  61.     cmode = getdosmemword (0x460);
  62.     return (cmode);
  63. #endif
  64.  
  65. #ifdef    OS2
  66.     VioGetCurType (&cursorInfo, 0);
  67. /* I am not sure about this JGB */
  68.     cmode = ((cursorInfo.yStart << 8) | (cursorInfo.cEnd));
  69.     return(cmode);
  70. #endif
  71.  
  72. #ifdef UNIX
  73.     return(0);/* this is N/A */
  74. #endif
  75. }
  76.